module.exports = function($scope, $resource, $modal, $modalInstance, obj){

	console.log(obj);

	/* 分页
     * ========================================= */
	$scope.maxSize = 5;            //最多显示多少个按钮
	$scope.bigCurrentPage = 1;      //当前页码
	$scope.itemsPerPage = 10;         //每页显示几条

	$scope.load = function () {

		var para = {
			'pageNo': $scope.bigCurrentPage,
			'pageSize': $scope.itemsPerPage,
			'openid' : obj.user_base,
			'fx_level' : obj.fx_level,
		};

		$resource('/api/as/wc/usedrecord/sysgoodsstatisticslist', {}, {}).save(para, function (res) {
			console.log(res);
			if(res.errcode != 0){
				//alert(res.errmsg);
				return;
			}
			console.log(res.data);
			$scope.objs = res.data;
			$scope.bigTotalItems = res.data.totalRecord;
		});
	};
	$scope.load();


	$scope.cancel = function () {
        $modalInstance.close();
    }



};
